package com.heihei.enums.common;

/**
 *  统一性别枚举
 *
 * @author duanhengfei
 * @date 2021年12月18日 20:56:10
 */
public enum SexEnum {
    MAIL(1, "男"),
    FEMAIL(2, "女"),
    UN_KNOW(0, "未知");


    private Integer key;
    private String description;

    public Integer getKey() {
        return key;
    }

    public String getDescription() {
        return description;
    }

    SexEnum(Integer key, String description) {
        this.key = key;
        this.description = description;
    }

    public static boolean containsKey(Integer sexKey) {
        if(MAIL.getKey().equals(sexKey) || FEMAIL.getKey().equals(sexKey) || UN_KNOW.getKey().equals(sexKey)) {
            return true;
        }
        return false;
    }
}
